<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
       <title>登录</title>
       <link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
       <link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap-theme.min.css" />
       <link rel="stylesheet" type="text/css" href="css/style.css" />
       <script src="js/jquery-1.11.3.min.js"></script>
       <script src="js/SensoroCordova.js"></script>
       <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
       <script type="text/javascript">
       function load() {
              // alert(Sensoro);
              // alert(SensoroView);
              // alert(SensoroUser);
              // alert(Sensoro.context);
       }

       function go2Main() {
              if (typeof SensoroView != "undefined") {
                     console.log('SensoroView undefined');
                     SensoroView.pushUrl('http://192.168.18.209:3000/main', 0);
              } else {
                     window.location.href = 'main';
              }
       }

       function pushUrl(url) {
              if (typeof SensoroView != "undefined") {
                     console.log('SensoroView undefined');
                     SensoroView.pushUrl(url, 0);
                     return false;
              }
       }

       function pushRegiste() {
              if (typeof SensoroView != "undefined") {
                     console.log('SensoroView undefined');
                     SensoroView.pushUrl('http://192.168.18.209:3000/registe', 0);
              } else {
                     window.location.href = 'registe';
              }
       }

       function popUrl() {
              // alert(SensoroView.popUrl);
              SensoroView.popUrl(0);
       }
       </script>
</head>

<body>
       <div class="box">
              <div class="login-box">
                     <div class="login-title text-center">
                            <h1><small>登录</small></h1>
                     </div>
                     <div class="login-content ">
                            <div class="form">
                                   <div class="form-group">
                                          <div class="col-xs-12  ">
                                                 <div class="input-group">
                                                        <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                                                        <input type="text" id="username" name="username" class="form-control" placeholder="用户名">
                                                 </div>
                                          </div>
                                   </div>
                                   <div class="form-group">
                                          <div class="col-xs-12  ">
                                                 <div class="input-group">
                                                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                                                        <input type="text" id="password" name="password" class="form-control" placeholder="密码">
                                                 </div>
                                          </div>
                                   </div>
                                   <div class="form-group form-actions">
                                          <div class="col-xs-4 col-xs-offset-4 ">
                                                 <button class="btn btn-sm btn-info" onclick="go2Main()"><span class="glyphicon glyphicon-off"></span> 登录</button>
                                          </div>
                                   </div>
                                   <div class="form-group">
                                          <div class="col-xs-12 link">
                                                 <p class="text-right remove-margin"><small>还没注册?</small> <a href="javascript:void(0);" onclick="pushRegiste()"><small>注册</small></a>
                                                 </p>
                                          </div>
                                   </div>
                            </div>
                     </div>
              </div>
       </div>
</body>

</html>
